/*
 * Main.java
 *
 * Created on February 12, 2007, 8:29 AM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package edu.byu.isys413.mystuff;

import javax.swing.UIManager;
import java.util.*;
import java.sql.*;
import java.io.*;
        

/**
 *
 * @author abasnet
 */
public class Main {
    
    public Main() {
        
    }
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        //try{customerCreateGUI cg = new customerCreateGUI();
        //    cg.setVisible(true);
        //    testDriver.test();
        //}catch(Exception e){}
        try{
            /*System.out.println("Testing PaymentDAO & BO");
            //paymentDAO pd = paymentDAO.getInstance();
            //ArrayList<paymentBO> pmts = pd.readALL();
            //System.out.println("Size =" + pmts.size());
            //if(pmts.size() != 0){
            //    for(int x=0; x<pmts.size();x++)
            //        System.out.println(pmts.get(x).toString());
            //}
            
            paymentBO pmt = pd.create();
            pmt.setAmountPaid(25.21);
            pmt.setChange(10.20);
            pmt.setPaymentType("Credit Card");
            System.out.println(pmt.toString());
            
            pd.save(pmt);
            pmt.setAmountPaid(289.00);
            pmt.setChange(100.20);
            pmt.setPaymentType("Cash");
            pd.save(pmt);*/
            
            /*System.out.println("Testing StoreDAO & BO");
            storeDAO sd = storeDAO.getInstance();
            ArrayList<storeBO> stlist = sd.readALL();
            System.out.println("Size =" + stlist.size());
            if(stlist.size() != 0){
                for(int x=0; x<stlist.size();x++)
                    System.out.println(stlist.get(x).toString());
            }
            
            storeBO str = sd.create();
            str.setAddress("25034 Wheeler Rd. Newhall VT, 93752");
            str.setPhone("661-255-3505");
            str.setManagerId("Dr. Hansen");
            sd.save(str);
            */
             
            /*System.out.println("Testing Employee BO & DAO");
            employeeDAO ed = employeeDAO.getInstance();
            ArrayList<employeeBO> eplist = ed.readALL();
            System.out.println("Size =" + eplist.size());
            if(eplist.size() != 0){
                for(int x=0; x<eplist.size(); x++)
                    System.out.println(eplist.get(x).toString());
            }*/
            
            /*employeeBO emp = ed.create();
            emp.setFirstName("Shamus");
            emp.setLastName("ThePlumber");
            emp.setHireDate("June 05");
            emp.setPhone("801-333-4444");
            emp.setSalary(10.00);
            emp.setStoreId("0987128yugf8uh298yutg29h8yu198yhwryasdjh");
            ed.save(emp);*/
            
            System.out.println("Testing Coupon BO & DAO");
            couponDAO cd = couponDAO.getInstance();
            ArrayList<couponBO> colist = cd.readALL();
            System.out.println("Size = " + colist.size());
            if(colist.size() != 0){
                for(int x=0; x<colist.size(); x++)
                    System.out.println(colist.get(x).toString());
            }
            
            /*System.out.println("Testing Revenue Source BO & DAO");
            revDAO rd = revDAO.getInstance();
            ArrayList<revBO> rlist = rd.readALL();
            System.out.println("Size = " + rlist.size());
            if(rlist.size()!=0){
                for(int x=0; x<rlist.size(); x++)
                    System.out.println(rlist.get(x).toString());
            }*/
            
            /*couponBO co = cd.create();
            co.setAmount(20.00);
            co.setTransactionLineId("00000000111111112222222223333333344444444");
            cd.save(co);*/
            
            /*System.out.println("Testing TransactionLine BO & DAO");
            tlineDAO td = tlineDAO.getInstance();
            ArrayList<tlineBO> tllist = td.readALL();
            System.out.println("Size = " + tllist.size());
            if(tllist.size() !=0){
                for(int x=0; x<tllist.size(); x++)
                    System.out.println(tllist.get(x).toString());
            }*/
            
            /*System.out.println("Testing Transaction BO & DAO");
            transDAO tsd = transDAO.getInstance();
            ArrayList<transBO> trlist = tsd.readALL();
            System.out.println("Size = " + trlist.size());
            if(trlist.size() !=0){
                for(int x=0; x<trlist.size(); x++)
                    System.out.println(trlist.get(x).toString());
            }*/
            
            storeDAO sd = storeDAO.getInstance();
            employeeDAO ed = employeeDAO.getInstance();
            employeeBO eb = ed.read("984y78rr8y43t8yuw945u89ewryutq483yw48yre");
            customerDAO custd = customerDAO.getInstance();
            customerBO cb = custd.create();
            storeBO sb = sd.read("0987128yugf8uh298yutg29h8yu198yhwryasdjh");
            tester test = new tester(sb, cb, eb);
            test.processATransaction();
            //test.processReturn();
            
        }catch(DataException e) {System.out.println("Exception Thrown in Main");}
    }
}



